// components/order-good-item/order-good-item.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    //common:就是普通的，不能再加减了，'dynNumber':可以再改变数字的
    goodType: {
      type: String,
      value: 'common'
    },
    isShowBottomLine: {
      type: Boolean,
      value: true,
    },
    goodData: {
      type: Object,
      value: {

      }
    },
    orderId: {
      type: Number,
      optionalTypes: [Number, String],
      value: 0,
    },
    orderStatus: {
      type: Number,
      optionalTypes: [Number, String],
      value: 0
    },
    orderNo: {
      type: Number,
      optionalTypes: [Number, String],
      value: 0,
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    selectNumber: 1,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    numberChange(e) {
      this.setData({
        selectNumber: e.detail
      })
    },
    //去评价
    pushToReply() {
      wx.navigateTo({
        url: '/featurePackage/pages/order/addReply/addReply?orderId=' + this.properties.orderId + "&uni=" + this.properties.goodData.attrId + "&orderNo=" + this.properties.orderNo,
      })
    },
    //跳转到评价详情去：
    pushToReplyDetail(){
      wx.navigateTo({
        url: '/featurePackage/pages/order/replyDetail/replyDetail?orderId=' + this.properties.orderId + "&uni=" + this.properties.goodData.attrId + "&orderNo=" + this.properties.orderNo + '&productId=' + this.properties.goodData.productId,
      })
    },
    //跳转到商品详情
    pushToDetail() {
      wx.navigateTo({
        url: '/shopMallPackage/pages/newStoreDetail/newStoreDetail?productId=' + this.properties.goodData.productId,
      })
    },
  }
})
